from django.contrib import admin
from django.urls import path, include
from django.shortcuts import render
from django.conf.urls import handler404, handler500


def index(request):
    return render(request, 'index.html')


def error_404(request, exception):
    data = {"status": 404}
    return render(request, '404.html', data)


def error_500(request):
    data = {"status": 500}
    return render(request, '404.html', data)


handler404 = error_404
handler500 = error_500

urlpatterns = [
    path("admin/", admin.site.urls),
    path("", index, name='index'),
    path("user/", include("userapp.urls", namespace="userapp")),
    path("tool/", include("toolapp.urls", namespace="toolapp")),
    path("test/", include("testapp.urls", namespace="testapp")),
    path("blog/", include("blogapp.urls", namespace="blogapp")),
    path("teacherSys/", include("teacherSys.urls")),

]
